package org.millioncall.yueyoga.admin.dao.impl;

import java.util.Map;

import org.millioncall.yueyoga.admin.dao.BaseDao;
import org.millioncall.yueyoga.admin.dao.TumTaskDAO;
import org.springframework.stereotype.Repository;

@Repository
public class TumTaskDAOImpl extends BaseDao implements TumTaskDAO {

	@Override
	public int save(Map<String, Object> map) {
		return this.save("saveTumTask", map);
	}

	@Override
	public int update(Map<String, Object> map) {
		return this.save("updateTumTaskById", map);
	}

	@Override
	public int deleteById(Integer id) {
		return this.deleteById("deleteTumTaskById", id);
	}

	@Override
	public int deleteByIds(String[] ids) {
		int len = 0;
		if (ids != null && ids.length > 0) {
			for (int i = 0; i < ids.length; i++) {
				len += this.deleteById(Integer.valueOf(ids[i]));
			}
		}
		return len;
	}

}
